package com.java.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import javax.validation.constraints.NotBlank;

/**
 * 资源
 * 
 * @author jl
 * @since 2020-10-09 09:30:58
 */
@Data
@TableName("resource")
public class Resource implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
    @TableId(type = IdType.INPUT)
    private String id;
	/**
	 * 名称|菜单或按钮
	 */
    @NotBlank(message = "名称|菜单或按钮不能为空")
    private String name;
	/**
	 * 页面|路由
	 */
    private String page;
	/**
	 * 请求|接口
	 */
    private String request;
	/**
	 * 父id
	 */
    private String parent;

    @TableField(exist = false)
    private List<Resource> children;

}
